<%@page import="com.zc.security.acl.domain.AclUser"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8" %>


<div id="menu" class="easyui-accordion" data-options="fit:true,border:false">
	<c:if test="${not empty GRANT_INFO.RESPONSE_DATA.MENU_LIST}">
	
	</c:if>
	<c:if test="${not empty USER_INFO.menuList}">

		<c:forEach var="menu" items="${USER_INFO.menuList}" >
			<c:if test="${ not empty menu.menu_system }">
				<c:if test="${menu.menu_parentid == 'TOP' && menu.menu_system != 'AUTH'}">
					<div title="${menu.menu_name}" selected="true">
						<ul>
							<c:forEach var="menu2" items="${USER_INFO.menuList}">
								<c:if test="${menu2.menu_parentid == menu.menu_id}">
									<li>
										<c:set var="isExistMenu3" value="0"></c:set>
										<c:forEach var="menu32" items="${USER_INFO.menuList}">
											<c:if test="${menu32.menu_parentid == menu2.menu_id}">
												<c:set var="isExistMenu3" value="1"></c:set>
											</c:if>
										</c:forEach>
										<c:if test="${isExistMenu3 > 0 }">
											<c:choose>
												<c:when test="${not empty menu2.menu_url}">
													<div class="menu2" id="menu2${menu2.menu_id }">
														<c:if test="${menu2.menu_code == 'visualizationInventory_zc_wms'}">
															<a class="menu2Title" href="<c:url value='${menu2.menu_url}'/>" target="_blank">
																${menu2.menu_name}${menu2.menu_isIframe}
															</a>
														</c:if>
														<c:if test="${menu2.menu_code != 'visualizationInventory_zc_wms'}">
															<a class="menu2Title" href="javascript:addTab('${menu2.menu_name}','<c:url value='${menu2.menu_url}'/>','${menu2.menu_isIframe }');">
																${menu2.menu_name}
															</a>
														</c:if>
														<a class="leftA" href="#" onclick="javascript:showMenu('${menu2.menu_id}');"></a>
													</div>
												</c:when>
												<c:otherwise>
													<a href="#" class="menu2_a" onclick="javascript:showMenu('${menu2.menu_id}');">
														<div class="menu2" id="menu2${menu2.menu_id }">
															${menu2.menu_name}
														</div>
													</a>
												</c:otherwise>
											</c:choose>
										</c:if>
										<c:if test="${isExistMenu3 == 0 }">
											<div class="notExistMenu3" id="menu2${menu2.menu_id }">
												<c:choose>
													<c:when test="${not empty menu2.menu_url}">
														<c:if test="${menu2.menu_code == 'visualizationInventory_zc_wms'}">
															<a class="menu2Title" href="<c:url value='${menu2.menu_url}'/>" target="_blank">
																${menu2.menu_name}
															</a>
														</c:if>
														<c:if test="${menu2.menu_code != 'visualizationInventory_zc_wms'}">
															<a class="menu2Title" href="javascript:addTab('${menu2.menu_name}','<c:url value='${menu2.menu_url}'/>','${menu2.menu_isIframe }');">
																${menu2.menu_name}
															</a>
														</c:if>
													</c:when>
													<c:otherwise>
														<a class="menu2Title" href="javascript:void('0')">${menu2.menu_name}</a>
													</c:otherwise>
												</c:choose>
											</div>
										</c:if>
										
										
										<div class="menu3" id="menu3${menu2.menu_id }" style="margin-top: 0px;padding-top: 0px;display:none">
											<c:forEach var="menu3" items="${USER_INFO.menuList}">
												<c:if test="${menu3.menu_parentid == menu2.menu_id}">
													<ul style="padding-top: 2px;">
														<li>
															<a href="javascript:addTab('${menu3.menu_name}','<c:url value='${menu3.menu_url}'/>','${menu3.menu_isIframe }');">
																${menu3.menu_name}
															</a>
														</li>
													</ul>
												</c:if>
											</c:forEach>
										</div>
									</li>
								</c:if>
							</c:forEach>
						</ul>
					</div>
				</c:if>
			</c:if>
		</c:forEach>
	</c:if>
</div>
<script type="text/javascript">
	function showMenu(id){
		if($("#menu3"+id).css("display")=="none"){
			$("#menu3"+id).slideDown("slow");
			$("#menu2"+id).addClass("show");
		}else{
			$("#menu3"+id).slideUp("slow");
			$("#menu2"+id).removeClass("show");
		}
	}
</script>
